﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using System.Collections.Generic;
using System.Linq;

namespace BattleforgeAssault
{
    public abstract class Location : GameObject
    {
        #region Properties

        private LocationView _view = null;
        public LocationView View { get { return _view; } set { _view = value; RaisePropertyChanged("View"); } }

        public Game Game { get { return _owner.Game; } }

        private Player _owner = null;
        public Player Owner { get { return _owner; } set { _owner = value; RaisePropertyChanged("Owner"); } }

        public IEnumerable<Card> Developments { get { return Game.Cards.Where(card => card.Location == this && card.IsDeveloped); } }

        public IEnumerable<Card> Cards { get { return Game.Cards.Where(card => card.Location == this); } }

        private string _name = "Location";
        public string Name { get { return _name; } set { _name = value; RaisePropertyChanged("Name"); } }

        private bool _isInPlay = false;
        public bool IsInPlay { get { return _isInPlay; } set { _isInPlay = value; RaisePropertyChanged("IsInPlay"); } }

        #endregion Properties

        #region Helper Methods

        public override string ToString() { return Name; }

        #endregion Helper Methods
    } // Class
} // Namespace
